package cn.kgc.service.impl;

import cn.kgc.mapper.QualityMapper;
import cn.kgc.pojo.Quality;
import cn.kgc.service.QualityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("qualityService")
public class QualityServiceimpl implements QualityService {

    @Resource
    QualityMapper qualityMapper;


    @Override
    public int getCount(String name) {
        return qualityMapper.getCount(name);
    }

    @Override
    public List<Quality> getByPage(Integer currentPageNo, Integer pageSize,String name) {
        Integer pageNo = (currentPageNo-1)*pageSize;
        return qualityMapper.getByPage(pageNo,pageSize,name);
    }

    @Override
    public List<Quality> getByName(String name) {
        return qualityMapper.getByName(name);
    }
}
